import 'package:animal/constant/color.dart';
import 'package:animal/constant/font.dart';
import 'package:animal/utils/screen_util.dart';
import 'package:flutter/material.dart';

///设置菜单item
class SetMenuItem extends StatelessWidget {
  String? text;
  void Function()? onTap;
  SetMenuItem({Key? key,this.text,this.onTap}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: onTap,
      child: Container(
        padding: EdgeInsets.fromLTRB(0, ScreenUtil().L(18), ScreenUtil().L(15), ScreenUtil().L(18)),
        decoration: BoxDecoration(
          border: Border(bottom: BorderSide(width: ScreenUtil().L(1),color: KColorConstant.lineE2E5E8))
        ),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
          Text(text??"",style: KFontConstant.myTextStyle(size: 17,)),
            Image.asset("icons/icon_next.png",width: ScreenUtil().L(15),)
        ],),
      ),
    );
  }
}
